Using Middle-out Reasoning to Control the Synthesis of Tail-recursive Programs 1

نویسندگان

  • Jane Hesketh
  • Alan Bundy
  • Alan Smaill
چکیده

We describe a novel technique for the automatic synthesis of tail-recursive programs. The technique is to specify the required program using the standard equations and then synthesise the tail-recursive program using the proofs as programs technique. This requires the speciication to be proved realisable in a constructive logic. Restrictions on the form of the proof ensure that the synthesised program is tail-recursive. The automatic search for a synthesis proof is controlled by proof plans, which are descriptions of the high-level structure of proofs of this kind. We have extended the known proof plans for inductive proofs by adding a new form of generalisation and by making greater use of middle-out reasoning. In middle-out reasoning we postpone decisions in the early part of the proof by the use of meta-variables which are instantiated, by uniication, during later parts of the proof. Higher order uniication is required, since these meta-variables can represent higher order objects. The program synthesised is automatically veriied to ensure that it satisses its speciication. This type of veriication is contrasted with template-based transformation approaches which require proofs that the general transformations described by the templates preserve equivalence. The technique described is more general than template-based approaches, since it is not tied to program patterns which must be speciied in advance. Detailed information about proof structure enables it to use a wider repertoire of rewritings in a more goal-directed way than comparable transformational techniques.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Using Middle-Out Reasoning to Control the Synthesis of Tail-Recursive Programs

We describe a novel technique for the automatic synthesis of tail-recursive programs. The technique is to specify the required program using the standard equations and then synthesise the tail-recursive program using the proofs as programs technique. This requires the speciication to be proved realisable in a constructive logic. Restrictions on the form of the proof ensure that the synthesised ...

متن کامل

General Techniques for Automatic Program Optimization and Synthesis Through Theorem Provingl

We report on program optimization research within the proofs as programs paradigm. Firstly, we describe program optimization by the transformation of program synthesis proofs (i.e. constructive existence proofs). Synthesis proofs which yield inefficient programs are transformed into analogous proofs which yield more efficient programs. The key to program optimization lies in the transformation ...

متن کامل

Using Computer Algebra techniques for the specification, verification and synthesis of recursive programs

We describe an innovative method for proving total correctness of tail recursive programs having a specific structure, namely programs in which an auxiliary tail recursive function is driven by a main nonrecursive function, and only the specification of the main function is provided. The specification of the auxiliary function is obtained almost fully automatically by solving coupled linear rec...

متن کامل

Middle - Out Reasoning for Synthesis and InductionIna

We develop two applications of middle-out reasoning in inductive proofs: Logic program synthesis and the selection of induction schemes. Middle-out reasoning as part of proof planning was rst suggested by Bundy et al Bundy et al 90a]. Middle-out reasoning uses variables to represent unknown terms and formulae. Uniication instantiates the variables in the subsequent planning, while proof plannin...

متن کامل

Inductive Program Synthesis: From Theory to Application

We present an approach to folding of finite program terms based on the detection of recurrence relations in a single given term which is considered as the kth unfolding of an unknown recursive program. Our approach goes beyond Summers’ classical approach of inductive program synthesis in several aspects and allows to deal with a larger class of programming problems. We show how inductive synthe...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1992